package com.santu.edu.supporter.exception;

/**
 * @author luoyaoqi
 * @createTime 2024/4/23
 * @description
 */
public enum RequestError {
    PARAM_ERROR(10002, "参数错误"),
    METHOD_NOT_SUPPORT(10003, "不支持{}请求方式"),
    PARAM_EMPTY_ERROR(10004, "{}不能为空"),
    MEDIA_TYPE_NOT_SUPPORTED(10005, " Content type '{}' not supported"),
    MissingRequestValue(10006, "缺少请求参数： '{}'"),
    UNKNOWN_ERROR(40001, "未知异常"),
    NULL_POINTER_ERROR(40002, "空指针异常");

    private final int code;
    private final String desc;

    private RequestError(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }
}
